package desgin.pattern.structure.proxy;

public class Main {
    public static void main(String[] args) {
        // 测试动态代理执行
        BusinessRealObject realObject = new BusinessRealObject();
        Business dynamicProxy = (Business) BusinessDymanicProxy.createProxy(realObject);
        dynamicProxy.operation();
        
        System.out.println("\n\n\n\n");
        // 测试静态代理执行
        BusinessRealObject realObject2 = new BusinessRealObject();
        BusinessStaticProxy staticProxy = new BusinessStaticProxy(realObject2);
        staticProxy.operation();

    }
}
